www.gusucode.com > 良精ASP微博管理系统 V1.0 > 良精ASP微博管理系统 V1.0\code\admin\SetSite.asp

    <%@ LANGUAGE = VBScript.Encode %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>网站信息设置</TITLE>
<link href="images/admin.css" rel="stylesheet" type="text/css">
</HEAD>
<!--#include file="../Include/liangconn.asp"-->
<!--#include file="../Include/CheckLogin.asp"-->
<BODY>
<%select case request.QueryString("Action")
  case "Save"
    SaveSiteInfo
  case "SaveConst"
    SaveConstInfo
  case else
end Select
%>
<br/>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<form name="ConstForm" method="post" action="?Action=SaveConst">
  <tr bgcolor="#FFFFFF">
    <th height="22" colspan="2">【网站参数设置】</th>
  </tr>
  <tr bgcolor="#FFFFFF" style="display:none;">
    <td width="10%" align="right" class="forumRow">系统安装目录:</td>
    <td width="70%" class="forumRowHighlight"><input name="SysRootDir" type="text" id="SysRootDir" style="width: 280" value="<%=SysRootDir%>"> 
      <font color="red">*</font>如系统在网站空间根目录下的<font color="red">Liangjing</font>目录下,这里应该填<font color="red">/Liangjing/</font>必须以<font color="red">/</font>开头和结尾</td>
  </tr>

  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">网站数据库目录:</td>
    <td class="forumRowHighlight"><input name="SiteDataPath" type="text" id="SiteDataPath" style="width: 280" value="<%=SiteDataPath%>" readonly> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">网站的LOGO :</td>
    <td class="forumRowHighlight"><input name="Web_Logo" type="text" id="Refresh" style="width: 400" value="<%=Web_Logo%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">网站名称 :</td>
    <td class="forumRowHighlight"><input name="Web_Name" type="text" id="Web_Name" style="width: 400" value="<%=Web_Name%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">网站口号:</td>
    <td class="forumRowHighlight"><input name="Web_Slong" type="text" id="Web_Slong" style="width: 400" value="<%=Web_Slong%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">网站网址:</td>
    <td class="forumRowHighlight"><input name="Web_HTTP" type="text" id="Web_HTTP" style="width: 400" value="<%=Web_HTTP%>"> <font color="red">*</font></td>
  </tr>
<tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">Keywords优化:</td>
    <td class="forumRowHighlight"><textarea name="Web_KeyWords" rows="4"  id="Web_KeyWords" style="width: 400"><%=Web_KeyWords%></textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">Description优化:</td>
    <td class="forumRowHighlight"><textarea name="Web_Description" rows="4" id="Web_Description" style="width: 400"><%=Web_Description%></textarea></td>
  </tr>
  
    <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">状态栏提示文本:</td>
    <td class="forumRowHighlight"><input name="Web_StatusKey" type="text" id="Web_StatusKey" style="width: 400" value="<%=Web_StatusKey%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">网站会员称呼:</td>
    <td class="forumRowHighlight"><input name="Web_UserCName" type="text" id="Web_UserCName" style="width: 400" value="<%=Web_UserCName%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">备案号:</td>
    <td class="forumRowHighlight"><input name="Web_BeiAnKey" type="text" id="Web_BeiAnKey" style="width: 400" value="<%=Web_BeiAnKey%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">网站版本信息 :</td>
    <td class="forumRowHighlight"><input name="Web_CopyRight" type="text" id="Web_CopyRight" style="width: 400" value="<%=Web_CopyRight%>"> <font color="red">*</font></td>
  </tr>

    <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">网站底部信息:</td>
 <td class="forumRowHighlight"><textarea name="Web_FooterMenu" rows="4" id="Web_FooterMenu" style="width: 400"><%=Web_FooterMenu%></textarea></td>
  </tr>
  <tr  bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">网站链接:</td>
    <td class="forumRowHighlight"><input name="Web_SrcUrlShow" type="radio" value="True" <%if Web_SrcUrlShow=True then%> checked<%end if%>>显示 <input name="Web_SrcUrlShow" type="radio" value="False" <%if Web_SrcUrlShow=False Or Trim(Web_SrcUrlShow)="" then%> checked<%end if%>>不显示 <font color="red">*</font></td>
  </tr>

  <tr  bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统默认头像:</td>
    <td class="forumRowHighlight"><input name="Web_Noimage" type="text" id="Web_Noimage" style="width: 400" value="<%=Web_Noimage%>"> <font color="red">*</font></td>
  </tr>


  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统头像列表是否开启 : </td>
    <td class="forumRowHighlight"><input name="Web_UphotoShow" type="radio" value="True" <%if Web_UphotoShow=True then%> checked<%end if%>>显示 <input name="Web_UphotoShow" type="radio" value="False" <%if Web_UphotoShow=false Or Trim(Web_UphotoShow)="" then%> checked<%end if%>>不显示 <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">自定义上传图片是否开启 : </td>
    <td class="forumRowHighlight"><input name="Web_UploadphotoShow" type="radio" value="True" <%if Web_UploadphotoShow=True then%> checked<%end if%>>显示 <input name="Web_UploadphotoShow" type="radio" value="False" <%if Web_UploadphotoShow=False Or Trim(Web_UploadphotoShow)="" then%> checked<%end if%>>不显示 <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统头像设置:</td>
    <td class="forumRowHighlight"><input name="Web_uphotoPath" type="text" id="Web_uphotoPath" style="width: 400" value="<%=Web_uphotoPath%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统头像后缀名:</td>
    <td class="forumRowHighlight"><input name="Web_UphotoExt" type="text" id="Web_UphotoExt" style="width: 400" value="<%=Web_UphotoExt%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统头像个数:</td>
    <td class="forumRowHighlight"><input name="Web_UphotoNum" type="text" id="Web_UphotoNum" style="width: 400" value="<%=Web_UphotoNum%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">发布微博内容最多个数:</td>
    <td class="forumRowHighlight"><input name="TextContentTxtNum" type="text" id="TextContentTxtNum" style="width: 400" value="<%=TextContentTxtNum%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">首页信息显示的条数:</td>
    <td class="forumRowHighlight"><input name="Web_ContentRecordNum" type="text" id="Web_ContentRecordNum" style="width: 400" value="<%=Web_ContentRecordNum%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">首页信息内容显示文字最多个数:</td>
    <td class="forumRowHighlight"><input name="Web_ContentTxtNum" type="text" id="Web_ContentTxtNum" style="width: 400" value="<%=Web_ContentTxtNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">评论显示的条数: </td>
    <td class="forumRowHighlight"><input name="Web_RevertRecordNum" type="text" id="Web_RevertRecordNum" style="width: 400" value="<%=Web_RevertRecordNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">评论内容字体最多个数: </td>
    <td class="forumRowHighlight"><input name="Web_RevertTxtNum" type="text" id="Web_RevertTxtNum" style="width: 400" value="<%=Web_RevertTxtNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">系统标签显示的个数: </td>
    <td class="forumRowHighlight"><input name="Web_SysTagsShowNum" type="text" id="Web_SysTagsShowNum" style="width: 400" value="<%=Web_SysTagsShowNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">系统标签显示列数: </td>
    <td class="forumRowHighlight"><input name="Web_SysTagsColNum" type="text" id="Web_SysTagsColNum" style="width: 400" value="<%=Web_SysTagsColNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">标签超过几个后才显示: </td>
    <td class="forumRowHighlight"><input name="Web_SysTagsDCount" type="text" id="Web_SysTagsDCount" style="width: 400" value="<%=Web_SysTagsDCount%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">自定义标签显示的个数: </td>
    <td class="forumRowHighlight"><input name="Web_WebTagsShowNum" type="text" id="Web_WebTagsShowNum" style="width: 400" value="<%=Web_WebTagsShowNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">自定义标签显示列数: </td>
    <td class="forumRowHighlight"><input name="Web_WebTagsColNum" type="text" id="Web_WebTagsColNum" style="width: 400" value="<%=Web_WebTagsColNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">自定义超过几个后才显示: </td>
    <td class="forumRowHighlight"><input name="Web_WebTagsDCount" type="text" id="Web_WebTagsDCount" style="width: 400" value="<%=Web_WebTagsDCount%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">友情链接文本字体个数 : </td>
    <td class="forumRowHighlight"><input name="Web_MessageNum" type="text" id="Web_MessageNum" style="width: 400" value="<%=Web_MessageNum%>"> <font color="red">*</font></td>
  </tr>

  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">友情链接列数 : </td>
    <td class="forumRowHighlight"><input name="Web_LinkColNum" type="text" id="Web_MessageNum" style="width: 400" value="<%=Web_MessageNum%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">友情链接显示的个数 : </td>
    <td class="forumRowHighlight"><input name="Web_LinkNum" type="text" id="Web_LinkNum" style="width: 400" value="<%=Web_LinkNum%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">友情链接图片宽度和高度: </td>
    <td class="forumRowHighlight">
	<input name="Web_LinkWidth" type="text" id="Web_LinkWidth" style="width: 200" value="<%=Web_LinkWidth%>"><font color="red">*</font>
	<input name="Web_LinkHeight" type="text" id="Web_LinkHeight" style="width: 200" value="<%=Web_LinkHeight%>"> <font color="red">*</font>
	
	</td>
  </tr>

  <tr bgcolor="#FFFFFF" style="display:none;">
    <td align="right" class="forumRow">页面宽高设置 : </td>
    <td class="forumRowHighlight">
	<input name="Web_TPageWidth" type="text" id="Web_TPageWidth" style="width: 200" value="<%=Web_TPageWidth%>"><font color="red">*</font>
	<input name="Web_RightWidth" type="text" id="Web_RightWidth" style="width: 200" value="<%=Web_RightWidth%>"> <font color="red">*</font>
	
	</td>
  </tr>
    <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">是否显示上传图片:</td>
    <td class="forumRowHighlight"><input name="Web_IsUploadShowImg" type="radio" value="1" <%if Web_IsUploadShowImg=1 then%> checked<%end if%>>显示上传图片<input name="Web_IsUploadShowImg" type="radio" value="0" <%if Web_IsUploadShowImg<>1 then%> checked<%end if%>>不显示上传图片 <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">内容区图片的位置 : </td>
    <td class="forumRowHighlight"><input name="Web_ContentImgLocation" type="text" id="Web_ContentImgLocation" style="width: 400" value="<%=Web_ContentImgLocation%>"> <font color="red">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow">上传图片宽和高</td>
    <td class="forumRowHighlight">
	<input name="Web_ContentImgMaxWidth" type="text" id="Web_ContentImgMaxWidth" style="width: 200" value="<%=Web_ContentImgMaxWidth%>"><font color="red">*</font>
	<input name="Web_ContentImgMaxHeight" type="text" id="Web_ContentImgMaxHeight" style="width: 200" value="<%=Web_ContentImgMaxHeight%>"> <font color="red">*</font>
	</td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td align="right" class="forumRow"></td>
    <td class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存附加参数设置">      </td>
  </tr>
  </form>
</table>
<br />
</BODY>
</HTML>
<%


Function SaveConstInfo()
 set fso=Server.CreateObject("Scripting.FileSystemObject")
 set hf=fso.CreateTextFile(Server.mappath("../config.asp"),true)
 hf.write "<" & "%" & vbcrlf
 hf.write "Const Web_Logo = " & chr(34) & ReplaceConstChar(trim(request("Web_Logo"))) & chr(34) & "" & vbcrlf
 hf.write "Const SysRootDir = " & chr(34) &trim(request("SysRootDir")) & chr(34) & "" & vbcrlf
 hf.write "Const SiteDataPath = " & chr(34) &trim(request("SiteDataPath")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_Name = " & chr(34) &trim(request("Web_Name")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_Slong = " & chr(34) & trim(request("Web_Slong")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_HTTP = " & chr(34) & trim(request("Web_HTTP")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_KeyWords = " & chr(34) & trim(request("Web_KeyWords"))& chr(34) & "" & vbcrlf
 hf.write "Const Web_Description = " & chr(34) & trim(request("Web_Description")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_UserCName = " & chr(34) & trim(request("Web_UserCName")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_StatusKey = " & chr(34) & trim(request("Web_StatusKey")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_BeiAnKey = " & chr(34) & trim(request("Web_BeiAnKey")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_CopyRight = " & chr(34) & trim(request("Web_CopyRight")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_FooterMenu = " & chr(34) & trim(request("Web_FooterMenu")) & chr(34) & "" & vbcrlf
 hf.write "Const Web_SrcUrlShow = " & ReplaceConstChar(trim(request("Web_SrcUrlShow"))) & "" & vbcrlf
 hf.write "Const Web_Noimage = " & chr(34) & ReplaceConstChar(trim(request("Web_Noimage"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_UphotoShow = " & trim(request("Web_UphotoShow")) & "" & vbcrlf
 hf.write "Const Web_UploadphotoShow = " & trim(request("Web_UploadphotoShow")) & "" & vbcrlf
 hf.write "Const Web_uphotoPath = " & chr(34) & ReplaceConstChar(trim(request("Web_uphotoPath"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_UphotoExt = " & chr(34) & ReplaceConstChar(trim(request("Web_UphotoExt"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_UphotoNum = " & chr(34) & ReplaceConstChar(trim(request("Web_UphotoNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const TextContentTxtNum = " & chr(34) & ReplaceConstChar(trim(request("TextContentTxtNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_ContentRecordNum = " & chr(34) & ReplaceConstChar(trim(request("Web_ContentRecordNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_ContentTxtNum = " & chr(34) & ReplaceConstChar(trim(request("Web_ContentTxtNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_RevertRecordNum = " & chr(34) & ReplaceConstChar(trim(request("Web_RevertRecordNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_RevertTxtNum = " & chr(34) & ReplaceConstChar(trim(request("Web_RevertTxtNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_SysTagsShowNum = " & chr(34) & ReplaceConstChar(trim(request("Web_SysTagsShowNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_SysTagsColNum = " & chr(34) & ReplaceConstChar(trim(request("Web_SysTagsColNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_SysTagsDCount = " & chr(34) & ReplaceConstChar(trim(request("Web_SysTagsDCount"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_WebTagsShowNum = " & chr(34) & ReplaceConstChar(trim(request("Web_WebTagsShowNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_WebTagsColNum = " & chr(34) & ReplaceConstChar(trim(request("Web_WebTagsColNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_WebTagsDCount = " & chr(34) & ReplaceConstChar(trim(request("Web_WebTagsDCount"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_MessageNum = " & chr(34) & ReplaceConstChar(trim(request("Web_MessageNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_LinkColNum = " & chr(34) & ReplaceConstChar(trim(request("Web_LinkColNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_LinkNum = " & chr(34) & ReplaceConstChar(trim(request("Web_LinkNum"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_LinkWidth = " & chr(34) & ReplaceConstChar(trim(request("Web_LinkWidth"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_LinkHeight = " & chr(34) & ReplaceConstChar(trim(request("Web_LinkHeight"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_TPageWidth = " & chr(34) & ReplaceConstChar(trim(request("Web_TPageWidth"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_RightWidth = " & chr(34) & ReplaceConstChar(trim(request("Web_RightWidth"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_IsUploadShowImg = " & chr(34) & ReplaceConstChar(trim(request("Web_IsUploadShowImg"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_ContentImgLocation = " & chr(34) & ReplaceConstChar(trim(request("Web_ContentImgLocation"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_ContentImgMaxWidth = " & chr(34) & ReplaceConstChar(trim(request("Web_ContentImgMaxWidth"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_ContentImgMaxHeight = " & chr(34) & ReplaceConstChar(trim(request("Web_ContentImgMaxHeight"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_EmailUserName = " & chr(34) & ReplaceConstChar(trim(request("Web_EmailUserName"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_EmailUserPass = " & chr(34) & ReplaceConstChar(trim(request("Web_EmailUserPass"))) & chr(34) & "" & vbcrlf
 hf.write "Const Web_EmailServer = " & chr(34) & ReplaceConstChar(trim(request("Web_EmailServer"))) & chr(34) & "" & vbcrlf
 hf.write "%" & ">"
 hf.close
 set hf=nothing
 set fso=Nothing
 response.Write "<script language=javascript>alert('系统附加参数设置成功!');location.href='SetSite.asp';</script>"
End Function

Function ReplaceConstChar(strChar)
    If strChar = "" Or IsNull(strChar) Then
        ReplaceConstChar = ""
        Exit Function
    End If
    Dim strBadChar, arrBadChar, tempChar, i
    strBadChar = "+,',%,^,&,?,(,),<,>,[,],{,},," & Chr(0) & ""
    arrBadChar = Split(strBadChar, ",")
    tempChar = strChar
    For i = 0 To UBound(arrBadChar)
        tempChar = Replace(tempChar, arrBadChar(i), "")
    Next
    tempChar = Replace(tempChar, "@@", "@")
    ReplaceConstChar = tempChar
End Function
%>